package com.wx.finance.biz.dto.vo;


import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 科目（表：subject）
 *
 */
@Data
public class GetSubjectDetailVo {
    private Long id;

    private Long pid;

    private String parentName;


    private String code;

    private String name;

    private Integer subjectCate;

    private String subjectCateName;

    // todo 后面需要统计余额返回给前端
    private BigDecimal subjectBalance = BigDecimal.ZERO;

    private SubjectCalculateDetailConfigVo subjectCalculateConfigVo;

    @Data
    public static class SubjectCalculateDetailConfigVo {
        private Boolean enableNumberCalculateConfig;

        private Boolean enableAssistCalculateConfigs;

        private Boolean enableForeignCurrencyConfig;

        private List<ForeignCurrencyConfigVo> foreignCurrencyConfig;

        private List<AssistCalculateConfigVo> assistCalculateConfigs;

    }

    /**
     * 外币核算配置
     */
    @Data
    public static class ForeignCurrencyConfigVo {
        private Long id;

        private String name;

        private BigDecimal exchangeRate;

        private Boolean baseCurrencyFlag;
    }

    /**
     * 辅助核算配置
     */
    @Data
    public static class AssistCalculateConfigVo {
        private Long id;

        private String name;

        private String code;

        private Boolean requiredFlag;
    }
}